//
//  
//  lvyou
//
//  Created by lanou3g on 13-12-30.
//  Copyright (c) 2013年 lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SingletonTemplate.h"
#import <CoreLocation/CoreLocation.h>


// ==================================================================
// 景点定位状态类型
// ==================================================================
typedef enum
{
    eSLocateStatusTypeInit = 1,
    eSLocateStatusTypeInProcess,                    // 正在定位
    eSLocateStatusTypeSuccess,                      // 定位成功
    eSLocateStatusTypeFailure,                      // 定位失败
} SLocateStatusType;

typedef void(^LocationBlock)(SLocateStatusType type, CLLocation *location);

@interface LocationMgr : NSObject<CLLocationManagerDelegate>

DECLARE_SINGLETON(LocationMgr)

// 定位管理器
@property(nonatomic, strong)CLLocationManager *locationManager;

// 定位状态类型
@property(nonatomic, assign)SLocateStatusType locateStatusType;

// 经纬度
@property(nonatomic, strong)CLLocation *location;

@property(nonatomic, copy)LocationBlock locationBlock;                      

-(void)getPosition:(LocationBlock)block;

@end
